<?php 
header("Content-type: text/html; charset=utf-8");
$mem = new Memcache();
$mem->connect('127.0.0.1');
//
$mem->set('key', 'This is a test!', 0, 60);
$val = $mem->get('key');
//
$mem->flush();
echo $val;
?>